Optimal. Leaf size=29 \[ \frac {\cot (x)}{\sqrt {a \csc ^2(x)}}+\frac {\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3738, 4210,
2670, 14} \begin {gather*} \frac {\cot (x)}{\sqrt {a \csc ^2(x)}}+\frac {\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2670
Rule 3738
Rule 4210
Rubi steps
\begin {align*} \int \frac {\tan ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx &=\int \frac {\tan ^2(x)}{\sqrt {a \csc ^2(x)}} \, dx\\ &=\frac {\csc (x) \int \sin (x) \tan ^2(x) \, dx}{\sqrt {a \csc ^2(x)}}\\ &=-\frac {\csc (x) \text {Subst}\left (\int \frac {1-x^2}{x^2} \, dx,x,\cos (x)\right )}{\sqrt {a \csc ^2(x)}}\\ &=-\frac {\csc (x) \text {Subst}\left (\int \left (-1+\frac {1}{x^2}\right ) \, dx,x,\cos (x)\right )}{\sqrt {a \csc ^2(x)}}\\ &=\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}+\frac {\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 19, normalized size = 0.66 \begin {gather*} \frac {\cot (x)+\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.42, size = 33, normalized size = 1.14
method | result | size |
default | \(\frac {\left (\sin ^{3}\left (x \right )\right ) \sqrt {4}}{2 \sqrt {-\frac {a}{\cos ^{2}\left (x \right )-1}}\, \cos \left (x \right ) \left (-1+\cos \left (x \right )\right )^{2}}\) | \(33\) |
risch | \(\frac {i {\mathrm e}^{2 i x}}{2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}+\frac {i}{2 \left ({\mathrm e}^{2 i x}-1\right ) \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}}+\frac {2 i {\mathrm e}^{2 i x}}{\sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right ) \left ({\mathrm e}^{2 i x}+1\right )}\) | \(114\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 18, normalized size = 0.62 \begin {gather*} \frac {\tan \left (x\right )^{2} + 2}{\sqrt {\tan \left (x\right )^{2} + 1} \sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.40, size = 35, normalized size = 1.21 \begin {gather*} \frac {{\left (\tan \left (x\right )^{3} + 2 \, \tan \left (x\right )\right )} \sqrt {\frac {a \tan \left (x\right )^{2} + a}{\tan \left (x\right )^{2}}}}{a \tan \left (x\right )^{2} + a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan ^{2}{\left (x \right )}}{\sqrt {a \left (\cot ^{2}{\left (x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 25, normalized size = 0.86 \begin {gather*} -\frac {2 \, \mathrm {sgn}\left (\sin \left (x\right )\right )}{\sqrt {a}} + \frac {\frac {1}{\cos \left (x\right )} + \cos \left (x\right )}{\sqrt {a} \mathrm {sgn}\left (\sin \left (x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.73, size = 34, normalized size = 1.17 \begin {gather*} \frac {{\mathrm {tan}\left (x\right )}^3\,\sqrt {\frac {1}{{\mathrm {tan}\left (x\right )}^2}}+2\,\mathrm {tan}\left (x\right )\,\sqrt {\frac {1}{{\mathrm {tan}\left (x\right )}^2}}}{\sqrt {a}\,\sqrt {{\mathrm {tan}\left (x\right )}^2+1}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________